#! /bin/sh -e

if [ "$1" = "build" ]
then
    ./clang
    ./build -no-ninja
    ./bundle -archive
elif [ "$1" = "docgen" ]
then
    ./clang
    ./docGen
else
    ./clang
    ./googleTest co
    ./googleTest build
    shift
    MODULE="$1"
    shift
    for dep in $*
    do
        ./test "$dep" -as-dep -no-ninja
    done
    ./test "$MODULE" -no-ninja
fi
